//
//  SINACourseResultsTableViewCell.m
//  sinashebao
//
//  Created by  androidlongs on 2017/12/27.
//  Copyright © 2017年  androidlongs. All rights reserved.
//

#import "SINACourseResultsTableViewCell.h"

@interface SINACourseResultsTableViewCell()

@property (weak, nonatomic) IBOutlet UILabel *subjectTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *subjectUserNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *subjectScoreLabel;

@end

@implementation SINACourseResultsTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

-(void)setScoreModel:(SINAStuSchoolYearScoreModel *)scoreModel{
    _scoreModel = scoreModel;
    if(self.flagIndex==0){
        self.subjectTitleLabel.text = scoreModel.subjectname;
        self.subjectTitleLabel.hidden=NO;
        self.subjectUserNameLabel.text = scoreModel.teachername;
        self.subjectUserNameLabel.hidden=NO;
        self.subjectScoreLabel.text = [NSString stringWithFormat:@"%0.0f",scoreModel.score];
        self.subjectScoreLabel.hidden=NO;
    }else{
        self.subjectTitleLabel.text = scoreModel.subName;
        self.subjectUserNameLabel.text = scoreModel.teachername;
        self.subjectUserNameLabel.hidden=YES;
        self.subjectScoreLabel.text = [NSString stringWithFormat:@"%ld/%@",([scoreModel.subSignTotal integerValue]- [scoreModel.subSignCurrent integerValue]),scoreModel.subSignTotal];;
    }
    
}

@end
